Shapefile Functionality

Upload a Shapefile

Shapefiles are uploaded to the FMSF for use as ignitions and barriers for the MTT, FARSITE, and FSPro models.  The geometry type of a shapefile can be point, polygon, polyline, or multipoint.

This functionality allows for the upload of a shapefile for use in the FMSF.

  • The shapefile at minimum must contain *.shp, *.prj, *.dbf, and *shx files

  • The shapefile must be in a compressed (zipped, *.zip) folder

  • The compressed folder can only contain a single shapefile

 

API Endpoint

API Endpoint

POST /model/shapeUpload

 

Example Request

curl -X POST "https://fmsf.firenet.gov/fmsfModelREST/model/shapeUpload" -H "accept: text/plain" -H "Authorization: Basic <basic64 encoded username:API key>" -H "Content-Type: multipart/form-data" -F "Landscape File=@<Shapefile zip>;type=application/x-zip-compressed"

 

Example Response

{"success":true,"queued":false,"includesWarningOrInfo":false,"multipleResponseMsgs":false,"msgCollector":null,"responseMessage": “Request to upload the shape file <Shapefile name>.zip was completed - shape ID is <Shapefile ID>","entityId":<Shapefile ID>}

 

Request Body

Name

Type

Required

Description

Authorization

String

Required

<Basic64 encoded username:API key> credentials of the User

Shapefile Zip

String

Required

<Shapefile Name> zip folder name that contains the GeoTIFF and metadata

 

Response Fields

Code 200 - OK

Name

Type

Description

success

Boolean

Upload completion status

queued

Boolean

Upload queued status

includesWarningOrInfo

Boolean

Not used; will be deprecated

multipleResponseMsgs

Boolean

Not used; will be deprecated

msgCollector

String

Not used; will be deprecated

responseMessage

String

Descriptive explanation what occurred during the request

entityId

Integer

<Shapefile ID> assigned to the shapefile by the FMSF when uploaded

 

Code 400 – The request was unacceptable

Invalid Shapefile file path provided

Code 401 – Unauthorized

Authorization info is missing or invalid

Code 500 – Server errors

Something went wrong on the FMSF end. Server error handling the request